package com.yun.controller;



import com.yun.pojo.Pet;
import com.yun.service.PetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.List;

@Controller
public class SickroomController {

    @Autowired
    PetService petService;


    @RequestMapping("/Clinic")
    public String Clinic(String pSickroom, Model model){
        List<Pet> pets = petService.queryPetBySickroom(pSickroom);
        model.addAttribute("pets",pets);
        return "doctor/medical";
    }
    @RequestMapping("/Pharmacy")
    public String Pharmacy(String pSickroom,Model model){
        List<Pet> pets = petService.queryPetBySickroom(pSickroom);
        model.addAttribute("pets",pets);
        return "doctor/medical";
    }
    @RequestMapping("/Operation")
    public String Operation(String pSickroom,Model model){
        List<Pet> pets = petService.queryPetBySickroom(pSickroom);
        model.addAttribute("pets",pets);
        return "doctor/medical";
    }


}
